<template>
  <div id="app" class="col">
    <!-- <img class="logo" :src="logo" 
          @mouseover="toggleLogo(1)" 
          @mouseout="toggleLogo(0)"/> -->
    <div class="row xian logo" @click="toHome()">现.</div>
    <div id="nav">
      <!-- <router-link to="/">Home</router-link>  -->
      <router-link to="/works">作品</router-link> 
      <router-link to="/photos">影集</router-link>
      <router-link to="/variety">综艺</router-link> 
    </div>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'app',
  data() {
    return {
      logo: require('./assets/logo.png')
      // logo: 'https://graph.baidu.com/thumb/v2/3294919919,2207648437.jpg'
    }
  },
  methods: {
    toggleLogo(i) {
      this.logo = (i == 0)?require('./assets/logo.png'):require('./assets/logo-hover.png')
    },
    toHome() {
      this.$router.push('/')
    }
  },
}
</script>

<style>
html,body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: #fffff3;
  font-size: 16px;
  letter-spacing: 1px;
  color: #323232;
}
#app {
  margin: 0 auto;
  width: 100%;
  height: 100%;
}
#nav {
  box-sizing: border-box;
  width: 1024px;
  padding: 20px;
  border-top: 1px solid #323232;
  border-bottom: 1px solid #323232;
  text-align: center;
}

#nav a {
  font-weight: bold;
  margin-right: 50px;
  text-decoration: none;
  color: #323232;
  font-size: 16px;
}
#nav a:last-child {
  margin-right: 0;
}
#nav a:hover {
  color: #000;
}
#nav a.router-link-exact-active {
  color: #ba4557;
}
.row {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.width-100 {
  width: 100%;
}
.logo {
  margin: 36px auto;
  cursor: pointer;
}
.page {
  width: 1024px;
  margin: 20px auto;
}
.xian {
  color: #323232;
  border: 6px solid #323232;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  justify-content: center;
  line-height: 88px;
  font-size: 55px;
  /* font-family: serif; */
}
.xian:hover {
  background: #323232;
  color: #fffff3;
}
@media screen and (max-width: 768px){
  #nav {
    width: 100%;
  }
  .page {
    width: 100%;
  }
  .logo {
    margin: 20px auto;
  }
  .xian {
    width: 56px;
    height: 56px;
    line-height: 56px;
    font-size: 36px;
    border-width: 4px;
  }
}
</style>
